home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / CMApplication.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  50.6 KB  |  1,775 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMApplication.a
  3. ;
  4. ;    Contains:    Color Matching Interfaces
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.1
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1992, 1994-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  19. __CMAPPLICATION__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  28.     include 'Files.a'
  29.     ENDIF
  30.     IF &TYPE('__PRINTING__') = 'UNDEFINED' THEN
  31.     include 'Printing.a'
  32.     ENDIF
  33.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  34.     include 'CMICCProfile.a'
  35.     ENDIF
  36.  
  37.  
  38. kDefaultCMMSignature            EQU        'appl'
  39. ;  Macintosh 68K trap word 
  40.  
  41. cmTrap                            EQU        $ABEE
  42.  
  43. ;  PicComment IDs 
  44.  
  45. cmBeginProfile                    EQU        220
  46. cmEndProfile                    EQU        221
  47. cmEnableMatching                EQU        222
  48. cmDisableMatching                EQU        223
  49. cmComment                        EQU        224
  50. ;  PicComment selectors for cmComment 
  51.  
  52. cmBeginProfileSel                EQU        0
  53. cmContinueProfileSel            EQU        1
  54. cmEndProfileSel                    EQU        2
  55. cmProfileIdentifierSel            EQU        3
  56.  
  57. ;  Defines for version 1.0 CMProfileSearchRecord.fieldMask 
  58.  
  59. cmMatchCMMType                    EQU        $00000001
  60. cmMatchApplProfileVersion        EQU        $00000002
  61. cmMatchDataType                    EQU        $00000004
  62. cmMatchDeviceType                EQU        $00000008
  63. cmMatchDeviceManufacturer        EQU        $00000010
  64. cmMatchDeviceModel                EQU        $00000020
  65. cmMatchDeviceAttributes            EQU        $00000040
  66. cmMatchFlags                    EQU        $00000080
  67. cmMatchOptions                    EQU        $00000100
  68. cmMatchWhite                    EQU        $00000200
  69. cmMatchBlack                    EQU        $00000400
  70. ;  Defines for version 2.0 CMSearchRecord.searchMask 
  71.  
  72. cmMatchAnyProfile                EQU        $00000000
  73. cmMatchProfileCMMType            EQU        $00000001
  74. cmMatchProfileClass                EQU        $00000002
  75. cmMatchDataColorSpace            EQU        $00000004
  76. cmMatchProfileConnectionSpace    EQU        $00000008
  77. cmMatchManufacturer                EQU        $00000010
  78. cmMatchModel                    EQU        $00000020
  79. cmMatchAttributes                EQU        $00000040
  80. cmMatchProfileFlags                EQU        $00000080
  81. ;  Result codes 
  82.  
  83.                                                             ; General Errors 
  84. cmProfileError                    EQU        -170
  85. cmMethodError                    EQU        -171
  86. cmMethodNotFound                EQU        -175                ; CMM not present 
  87. cmProfileNotFound                EQU        -176                ; Responder error 
  88. cmProfilesIdentical                EQU        -177                ; Profiles the same 
  89. cmCantConcatenateError            EQU        -178                ; Profile can't be concatenated 
  90. cmCantXYZ                        EQU        -179                ; CMM cant handle XYZ space 
  91. cmCantDeleteProfile                EQU        -180                ; Responder error 
  92. cmUnsupportedDataType            EQU        -181                ; Responder error 
  93. cmNoCurrentProfile                EQU        -182                ; Responder error 
  94.                                                             ; Profile Access Errors 
  95. cmElementTagNotFound            EQU        -4200
  96. cmIndexRangeErr                    EQU        -4201                ; Tag index out of range 
  97. cmCantDeleteElement                EQU        -4202
  98. cmFatalProfileErr                EQU        -4203
  99. cmInvalidProfile                EQU        -4204                ; A Profile must contain a 'cs1 ' tag to be valid 
  100. cmInvalidProfileLocation        EQU        -4205                ; Operation not supported for this profile location 
  101. cmCantCopyModifiedV1Profile        EQU        -4215                ; Illegal to copy version 1 profiles that have been modified 
  102.                                                             ; Profile Search Errors 
  103. cmInvalidSearch                    EQU        -4206                ; Bad Search Handle 
  104. cmSearchError                    EQU        -4207
  105. cmErrIncompatibleProfile        EQU        -4208                ; Other ColorSync Errors 
  106. cmInvalidColorSpace                EQU        -4209                ; Profile colorspace does not match bitmap type 
  107. cmInvalidSrcMap                    EQU        -4210                ; Source pix/bit map was invalid 
  108. cmInvalidDstMap                    EQU        -4211                ; Destination pix/bit map was invalid 
  109. cmNoGDevicesError                EQU        -4212                ; Begin/End Matching -- no gdevices available 
  110. cmInvalidProfileComment            EQU        -4213                ; Bad Profile comment during drawpicture 
  111. cmRangeOverFlow                    EQU        -4214                ; Color conversion warning that some output color values over/underflowed and were clipped 
  112. cmNamedColorNotFound            EQU        -4216                ; NamedColor not found 
  113. cmCantGamutCheckError            EQU        -4217                ; Gammut checking not supported by this ColorWorld 
  114. ;  deviceType values for ColorSync 1.0 Device Profile access 
  115.  
  116. cmSystemDevice                    EQU        'sys '
  117. cmGDevice                        EQU        'gdev'
  118. ;  Commands for CMFlattenUPP(…) 
  119.  
  120. cmOpenReadSpool                    EQU        1
  121. cmOpenWriteSpool                EQU        2
  122. cmReadSpool                        EQU        3
  123. cmWriteSpool                    EQU        4
  124. cmCloseSpool                    EQU        5
  125. ;  Flags for PostScript-related functions 
  126.  
  127. cmPS7bit                        EQU        1
  128. cmPS8bit                        EQU        2
  129. ;  Flags for profile embedding functions 
  130.  
  131. cmEmbedWholeProfile                EQU        $00000000
  132. cmEmbedProfileIdentifier        EQU        $00000001
  133. ;  Commands for CMAccessUPP(…) 
  134.  
  135. cmOpenReadAccess                EQU        1
  136. cmOpenWriteAccess                EQU        2
  137. cmReadAccess                    EQU        3
  138. cmWriteAccess                    EQU        4
  139. cmCloseAccess                    EQU        5
  140. cmCreateNewAccess                EQU        6
  141. cmAbortWriteAccess                EQU        7
  142. cmBeginAccess                    EQU        8
  143. cmEndAccess                        EQU        9
  144.  
  145. ;  Abstract data type for memory-based Profile 
  146.  
  147.  
  148. ;  Abstract data type for Profile search result 
  149.  
  150.  
  151. ;  Abstract data type for BeginMatching(…) reference 
  152.  
  153.  
  154. ;  Abstract data type for ColorWorld reference 
  155.  
  156.  
  157. ;  Caller-supplied flatten function 
  158. ;  Caller-supplied progress function for Bitmap & PixMap matching routines 
  159. ;  Caller-supplied filter function for Profile search 
  160. ;  Caller-supplied function for profile access 
  161. ; typedef long                             CMError
  162.  
  163. ;  For 1.0 and 2.0 profile header variants 
  164. ;  CMAppleProfileHeader 
  165. CMAppleProfileHeader    RECORD 0
  166. cm1                         ds        CMHeader        ; offset: $0 (0)
  167.                          ORG 0
  168. cm2                         ds        CM2Header        ; offset: $0 (0)
  169. sizeof                     EQU *                    ; size:   $80 (128)
  170.                         ENDR
  171. ;  Param for CWConcatColorWorld(…) 
  172. CMConcatProfileSet        RECORD 0
  173. keyIndex                 ds.w    1                ; offset: $0 (0)        ;  Zero-based 
  174. count                     ds.w    1                ; offset: $2 (2)        ;  Min 1 
  175. profileSet                 ds.l    1                ; offset: $4 (4) <-- really an array of length one ;  Variable. Ordered from Source -> Dest 
  176. sizeof                     EQU *                    ; size:   $8 (8)
  177.                         ENDR
  178. ;  ColorSync color data types 
  179. CMRGBColor                RECORD 0
  180. red                         ds.w    1                ; offset: $0 (0)        ;  0..65535 
  181. green                     ds.w    1                ; offset: $2 (2)
  182. blue                     ds.w    1                ; offset: $4 (4)
  183. sizeof                     EQU *                    ; size:   $6 (6)
  184.                         ENDR
  185. CMCMYKColor                RECORD 0
  186. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  187. magenta                     ds.w    1                ; offset: $2 (2)
  188. yellow                     ds.w    1                ; offset: $4 (4)
  189. black                     ds.w    1                ; offset: $6 (6)
  190. sizeof                     EQU *                    ; size:   $8 (8)
  191.                         ENDR
  192. CMCMYColor                RECORD 0
  193. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  194. magenta                     ds.w    1                ; offset: $2 (2)
  195. yellow                     ds.w    1                ; offset: $4 (4)
  196. sizeof                     EQU *                    ; size:   $6 (6)
  197.                         ENDR
  198. CMHLSColor                RECORD 0
  199. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  200. lightness                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  201. saturation                 ds.w    1                ; offset: $4 (4)        ;  0..65535 
  202. sizeof                     EQU *                    ; size:   $6 (6)
  203.                         ENDR
  204. CMHSVColor                RECORD 0
  205. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  206. saturation                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  207. value                     ds.w    1                ; offset: $4 (4)        ;  0..65535 
  208. sizeof                     EQU *                    ; size:   $6 (6)
  209.                         ENDR
  210. CMLabColor                RECORD 0
  211. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  212. a                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  213. b                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  214. sizeof                     EQU *                    ; size:   $6 (6)
  215.                         ENDR
  216. CMLuvColor                RECORD 0
  217. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  218. u                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  219. v                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  220. sizeof                     EQU *                    ; size:   $6 (6)
  221.                         ENDR
  222. CMYxyColor                RECORD 0
  223. capY                     ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..1 
  224. x                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to 0..1 
  225. y                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to 0..1 
  226. sizeof                     EQU *                    ; size:   $6 (6)
  227.                         ENDR
  228. CMGrayColor                RECORD 0
  229. gray                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  230. sizeof                     EQU *                    ; size:   $2 (2)
  231.                         ENDR
  232. CMMultichannel5Color    RECORD 0
  233. components                 ds.b    5                ; offset: $0 (0)        ;  0..255 
  234.                          ORG 6
  235. sizeof                     EQU *                    ; size:   $6 (6)
  236.                         ENDR
  237. CMMultichannel6Color    RECORD 0
  238. components                 ds.b    6                ; offset: $0 (0)        ;  0..255 
  239. sizeof                     EQU *                    ; size:   $6 (6)
  240.                         ENDR
  241. CMMultichannel7Color    RECORD 0
  242. components                 ds.b    7                ; offset: $0 (0)        ;  0..255 
  243.                          ORG 8
  244. sizeof                     EQU *                    ; size:   $8 (8)
  245.                         ENDR
  246. CMMultichannel8Color    RECORD 0
  247. components                 ds.b    8                ; offset: $0 (0)        ;  0..255 
  248. sizeof                     EQU *                    ; size:   $8 (8)
  249.                         ENDR
  250. CMNamedColor            RECORD 0
  251. namedColorIndex             ds.l    1                ; offset: $0 (0)        ;  0..a lot 
  252. sizeof                     EQU *                    ; size:   $4 (4)
  253.                         ENDR
  254. CMColor                    RECORD 0
  255. rgb                         ds        CMRGBColor        ; offset: $0 (0)
  256.                          ORG 0
  257. hsv                         ds        CMHSVColor        ; offset: $0 (0)
  258.                          ORG 0
  259. hls                         ds        CMHLSColor        ; offset: $0 (0)
  260.                          ORG 0
  261. XYZ                         ds        CMXYZColor        ; offset: $0 (0)
  262.                          ORG 0
  263. Lab                         ds        CMLabColor        ; offset: $0 (0)
  264.                          ORG 0
  265. Luv                         ds        CMLuvColor        ; offset: $0 (0)
  266.                          ORG 0
  267. Yxy                         ds        CMYxyColor        ; offset: $0 (0)
  268.                          ORG 0
  269. cmyk                     ds        CMCMYKColor        ; offset: $0 (0)
  270.                          ORG 0
  271. cmy                         ds        CMCMYColor        ; offset: $0 (0)
  272.                          ORG 0
  273. gray                     ds        CMGrayColor        ; offset: $0 (0)
  274.                          ORG 0
  275. mc5                         ds        CMMultichannel5Color ; offset: $0 (0)
  276.                          ORG 0
  277. mc6                         ds        CMMultichannel6Color ; offset: $0 (0)
  278.                          ORG 0
  279. mc7                         ds        CMMultichannel7Color ; offset: $0 (0)
  280.                          ORG 0
  281. mc8                         ds        CMMultichannel8Color ; offset: $0 (0)
  282.                          ORG 0
  283. namedColor                 ds        CMNamedColor    ; offset: $0 (0)
  284.                          ORG 8
  285. sizeof                     EQU *                    ; size:   $8 (8)
  286.                         ENDR
  287. CMProfileSearchRecord    RECORD 0
  288. header                     ds        CMHeader        ; offset: $0 (0)
  289. fieldMask                 ds.l    1                ; offset: $40 (64)
  290. reserved                 ds.l    2                ; offset: $44 (68)
  291. sizeof                     EQU *                    ; size:   $4C (76)
  292.                         ENDR
  293. ; typedef struct CMProfileSearchRecord * CMProfileSearchRecordPtr
  294.  
  295. ; typedef CMProfileSearchRecordPtr *    CMProfileSearchRecordHandle
  296.  
  297. ;  Search definition for 2.0 
  298. CMSearchRecord            RECORD 0
  299. CMMType                     ds.l    1                ; offset: $0 (0)
  300. profileClass             ds.l    1                ; offset: $4 (4)
  301. dataColorSpace             ds.l    1                ; offset: $8 (8)
  302. profileConnectionSpace     ds.l    1                ; offset: $C (12)
  303. deviceManufacturer         ds.l    1                ; offset: $10 (16)
  304. deviceModel                 ds.l    1                ; offset: $14 (20)
  305. deviceAttributes         ds.l    2                ; offset: $18 (24)
  306. profileFlags             ds.l    1                ; offset: $20 (32)
  307. searchMask                 ds.l    1                ; offset: $24 (36)
  308. filter                     ds.l    1                ; offset: $28 (40)
  309. sizeof                     EQU *                    ; size:   $2C (44)
  310.                         ENDR
  311. ;  GetCWInfo structures 
  312. CMMInfoRecord            RECORD 0
  313. CMMType                     ds.l    1                ; offset: $0 (0)
  314. CMMVersion                 ds.l    1                ; offset: $4 (4)
  315. sizeof                     EQU *                    ; size:   $8 (8)
  316.                         ENDR
  317. CMCWInfoRecord            RECORD 0
  318. cmmCount                 ds.l    1                ; offset: $0 (0)
  319. cmmInfo                     ds.b    2 * CMMInfoRecord.sizeof ; offset: $4 (4)
  320. sizeof                     EQU *                    ; size:   $14 (20)
  321.                         ENDR
  322. ;  profile identifier structures 
  323. CMProfileIdentifier        RECORD 0
  324. profileHeader             ds        CM2Header        ; offset: $0 (0)
  325. calibrationDate             ds        CMDateTime        ; offset: $80 (128)
  326. ASCIIProfileDescriptionLen  ds.l 1                ; offset: $8C (140)
  327. ASCIIProfileDescription     ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  variable length 
  328.                          ORG 146
  329. sizeof                     EQU *                    ; size:   $92 (146)
  330.                         ENDR
  331. ; typedef struct CMProfileIdentifier *    CMProfileIdentifierPtr
  332.  
  333. ;  packing formats 
  334.  
  335. cmNoColorPacking                EQU        $0000
  336. cmAlphaSpace                    EQU        $0080
  337. cmWord5ColorPacking                EQU        $0500
  338. cmLong8ColorPacking                EQU        $0800
  339. cmLong10ColorPacking            EQU        $0A00
  340. cmAlphaFirstPacking                EQU        $1000
  341. cmOneBitDirectPacking            EQU        $0B00
  342. cmAlphaLastPacking                EQU        $0000
  343. cm24_8ColorPacking                EQU        $2100
  344. cm32_8ColorPacking                EQU        $0800
  345. cm40_8ColorPacking                EQU        $2200
  346. cm48_8ColorPacking                EQU        $2300
  347. cm56_8ColorPacking                EQU        $2400
  348. cm64_8ColorPacking                EQU        $2500
  349. cm32_16ColorPacking                EQU        $2600
  350. cm32_32ColorPacking                EQU        $2700
  351. ;  general colorspaces 
  352.  
  353. cmNoSpace                        EQU        0
  354. cmRGBSpace                        EQU        1
  355. cmCMYKSpace                        EQU        2
  356. cmHSVSpace                        EQU        3
  357. cmHLSSpace                        EQU        4
  358. cmYXYSpace                        EQU        5
  359. cmXYZSpace                        EQU        6
  360. cmLUVSpace                        EQU        7
  361. cmLABSpace                        EQU        8
  362. cmReservedSpace1                EQU        9
  363. cmGraySpace                        EQU        10
  364. cmReservedSpace2                EQU        11
  365. cmGamutResultSpace                EQU        12
  366. cmNamedIndexedSpace                EQU        16
  367. cmMCFiveSpace                    EQU        17
  368. cmMCSixSpace                    EQU        18
  369. cmMCSevenSpace                    EQU        19
  370. cmMCEightSpace                    EQU        20
  371. ;  supported CMBitmapColorSpaces - each of the following is a 
  372. ;  combination of a general colospace and a packing formats 
  373.  
  374. cmRGBASpace                        EQU        129
  375. cmGrayASpace                    EQU        138
  376. cmRGB16Space                    EQU        $0501
  377. cmRGB32Space                    EQU        $0801
  378. cmARGB32Space                    EQU        $1881
  379. cmCMYK32Space                    EQU        $0802
  380. cmHSV32Space                    EQU        $0A03
  381. cmHLS32Space                    EQU        $0A04
  382. cmYXY32Space                    EQU        $0A05
  383. cmXYZ32Space                    EQU        $0A06
  384. cmLUV32Space                    EQU        $0A07
  385. cmLAB32Space                    EQU        $0A08
  386. cmGamutResult1Space                EQU        $0B0C
  387. cmRGB24Space                    EQU        $2101
  388. cmRGBA32Space                    EQU        $0881
  389. cmLAB24Space                    EQU        $2108
  390. cmNamedIndexed32Space            EQU        $2710
  391. cmMCFive8Space                    EQU        $2211
  392. cmMCSix8Space                    EQU        $2312
  393. cmMCSeven8Space                    EQU        $2413
  394. cmMCEight8Space                    EQU        $2514
  395.  
  396. ; typedef unsigned long                 CMBitmapColorSpace
  397.  
  398. CMBitmap                RECORD 0
  399. image                     ds.l    1                ; offset: $0 (0)
  400. width                     ds.l    1                ; offset: $4 (4)
  401. height                     ds.l    1                ; offset: $8 (8)
  402. rowBytes                 ds.l    1                ; offset: $C (12)
  403. pixelSize                 ds.l    1                ; offset: $10 (16)
  404. space                     ds.l    1                ; offset: $14 (20)
  405. user1                     ds.l    1                ; offset: $18 (24)
  406. user2                     ds.l    1                ; offset: $1C (28)
  407. sizeof                     EQU *                    ; size:   $20 (32)
  408.                         ENDR
  409.  
  410. ;  Classic Print Manager Stuff 
  411.  
  412. enableColorMatchingOp            EQU        12
  413. registerProfileOp                EQU        13
  414.  
  415. cmNoProfileBase                    EQU        0
  416. cmFileBasedProfile                EQU        1
  417. cmHandleBasedProfile            EQU        2
  418. cmPtrBasedProfile                EQU        3
  419. cmProcedureBasedProfile            EQU        4
  420. CMFileLocation            RECORD 0
  421. spec                     ds        FSSpec            ; offset: $0 (0)
  422. sizeof                     EQU *                    ; size:   $46 (70)
  423.                         ENDR
  424. CMHandleLocation        RECORD 0
  425. h                         ds.l    1                ; offset: $0 (0)
  426. sizeof                     EQU *                    ; size:   $4 (4)
  427.                         ENDR
  428. CMPtrLocation            RECORD 0
  429. p                         ds.l    1                ; offset: $0 (0)
  430. sizeof                     EQU *                    ; size:   $4 (4)
  431.                         ENDR
  432. CMProcedureLocation        RECORD 0
  433. proc                     ds.l    1                ; offset: $0 (0)
  434. refCon                     ds.l    1                ; offset: $4 (4)
  435. sizeof                     EQU *                    ; size:   $8 (8)
  436.                         ENDR
  437.  
  438. CMProfLoc                RECORD 0
  439. fileLoc                     ds        CMFileLocation ; offset: $0 (0)
  440.                          ORG 0
  441. handleLoc                 ds        CMHandleLocation ; offset: $0 (0)
  442.                          ORG 0
  443. ptrLoc                     ds        CMPtrLocation    ; offset: $0 (0)
  444.                          ORG 0
  445. procLoc                     ds        CMProcedureLocation ; offset: $0 (0)
  446.                          ORG 70
  447. sizeof                     EQU *                    ; size:   $46 (70)
  448.                         ENDR
  449. CMProfileLocation        RECORD 0
  450. locType                     ds.w    1                ; offset: $0 (0)
  451. u                         ds        CMProfLoc        ; offset: $2 (2)
  452. sizeof                     EQU *                    ; size:   $48 (72)
  453.                         ENDR
  454. ;  Profile file and element access 
  455. ;
  456. ; pascal CMError CMNewProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  457. ;
  458.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  459.         Macro
  460.         _CMNewProfile
  461.             move.l              #$0008001B,D0
  462.             dc.w                $ABEE
  463.         EndM
  464.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  465.         IMPORT_CFM_FUNCTION CMNewProfile
  466.     ENDIF
  467.  
  468. ;
  469. ; pascal CMError CMOpenProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  470. ;
  471.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  472.         Macro
  473.         _CMOpenProfile
  474.             move.l              #$0008001C,D0
  475.             dc.w                $ABEE
  476.         EndM
  477.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  478.         IMPORT_CFM_FUNCTION CMOpenProfile
  479.     ENDIF
  480.  
  481. ;
  482. ; pascal CMError CMCloseProfile(CMProfileRef prof)
  483. ;
  484.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  485.         Macro
  486.         _CMCloseProfile
  487.             move.l              #$0004001D,D0
  488.             dc.w                $ABEE
  489.         EndM
  490.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  491.         IMPORT_CFM_FUNCTION CMCloseProfile
  492.     ENDIF
  493.  
  494. ;
  495. ; pascal CMError CMUpdateProfile(CMProfileRef prof)
  496. ;
  497.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  498.         Macro
  499.         _CMUpdateProfile
  500.             move.l              #$00040034,D0
  501.             dc.w                $ABEE
  502.         EndM
  503.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  504.         IMPORT_CFM_FUNCTION CMUpdateProfile
  505.     ENDIF
  506.  
  507. ;
  508. ; pascal CMError CMCopyProfile(CMProfileRef *targetProf, const CMProfileLocation *targetLocation, CMProfileRef srcProf)
  509. ;
  510.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  511.         Macro
  512.         _CMCopyProfile
  513.             move.l              #$000C0025,D0
  514.             dc.w                $ABEE
  515.         EndM
  516.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  517.         IMPORT_CFM_FUNCTION CMCopyProfile
  518.     ENDIF
  519.  
  520. ;
  521. ; pascal CMError CMValidateProfile(CMProfileRef prof, Boolean *valid, Boolean *preferredCMMnotfound)
  522. ;
  523.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  524.         Macro
  525.         _CMValidateProfile
  526.             move.l              #$000C0026,D0
  527.             dc.w                $ABEE
  528.         EndM
  529.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  530.         IMPORT_CFM_FUNCTION CMValidateProfile
  531.     ENDIF
  532.  
  533. ;
  534. ; pascal CMError CMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile)
  535. ;
  536.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  537.         Macro
  538.         _CMGetProfileLocation
  539.             move.l              #$0008003C,D0
  540.             dc.w                $ABEE
  541.         EndM
  542.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  543.         IMPORT_CFM_FUNCTION CMGetProfileLocation
  544.     ENDIF
  545.  
  546. ;
  547. ; pascal CMError CMFlattenProfile(CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  548. ;
  549.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  550.         Macro
  551.         _CMFlattenProfile
  552.             move.l              #$00140031,D0
  553.             dc.w                $ABEE
  554.         EndM
  555.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  556.         IMPORT_CFM_FUNCTION CMFlattenProfile
  557.     ENDIF
  558.  
  559. ;
  560. ; pascal CMError CMUnflattenProfile(FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  561. ;
  562.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  563.         Macro
  564.         _CMUnflattenProfile
  565.             move.l              #$00100032,D0
  566.             dc.w                $ABEE
  567.         EndM
  568.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  569.         IMPORT_CFM_FUNCTION CMUnflattenProfile
  570.     ENDIF
  571.  
  572. ;
  573. ; pascal CMError CMGetProfileHeader(CMProfileRef prof, CMAppleProfileHeader *header)
  574. ;
  575.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  576.         Macro
  577.         _CMGetProfileHeader
  578.             move.l              #$00080039,D0
  579.             dc.w                $ABEE
  580.         EndM
  581.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  582.         IMPORT_CFM_FUNCTION CMGetProfileHeader
  583.     ENDIF
  584.  
  585. ;
  586. ; pascal CMError CMSetProfileHeader(CMProfileRef prof, const CMAppleProfileHeader *header)
  587. ;
  588.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  589.         Macro
  590.         _CMSetProfileHeader
  591.             move.l              #$0008003A,D0
  592.             dc.w                $ABEE
  593.         EndM
  594.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  595.         IMPORT_CFM_FUNCTION CMSetProfileHeader
  596.     ENDIF
  597.  
  598. ;
  599. ; pascal CMError CMProfileElementExists(CMProfileRef prof, OSType tag, Boolean *found)
  600. ;
  601.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  602.         Macro
  603.         _CMProfileElementExists
  604.             move.l              #$000C001E,D0
  605.             dc.w                $ABEE
  606.         EndM
  607.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  608.         IMPORT_CFM_FUNCTION CMProfileElementExists
  609.     ENDIF
  610.  
  611. ;
  612. ; pascal CMError CMCountProfileElements(CMProfileRef prof, unsigned long *elementCount)
  613. ;
  614.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  615.         Macro
  616.         _CMCountProfileElements
  617.             move.l              #$0008001F,D0
  618.             dc.w                $ABEE
  619.         EndM
  620.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  621.         IMPORT_CFM_FUNCTION CMCountProfileElements
  622.     ENDIF
  623.  
  624. ;
  625. ; pascal CMError CMGetProfileElement(CMProfileRef prof, OSType tag, unsigned long *elementSize, void *elementData)
  626. ;
  627.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  628.         Macro
  629.         _CMGetProfileElement
  630.             move.l              #$00100020,D0
  631.             dc.w                $ABEE
  632.         EndM
  633.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  634.         IMPORT_CFM_FUNCTION CMGetProfileElement
  635.     ENDIF
  636.  
  637. ;
  638. ; pascal CMError CMSetProfileElement(CMProfileRef prof, OSType tag, unsigned long elementSize, void *elementData)
  639. ;
  640.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  641.         Macro
  642.         _CMSetProfileElement
  643.             move.l              #$00100023,D0
  644.             dc.w                $ABEE
  645.         EndM
  646.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  647.         IMPORT_CFM_FUNCTION CMSetProfileElement
  648.     ENDIF
  649.  
  650. ;
  651. ; pascal CMError CMSetProfileElementSize(CMProfileRef prof, OSType tag, unsigned long elementSize)
  652. ;
  653.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  654.         Macro
  655.         _CMSetProfileElementSize
  656.             move.l              #$000C0038,D0
  657.             dc.w                $ABEE
  658.         EndM
  659.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  660.         IMPORT_CFM_FUNCTION CMSetProfileElementSize
  661.     ENDIF
  662.  
  663. ;
  664. ; pascal CMError CMSetProfileElementReference(CMProfileRef prof, OSType elementTag, OSType referenceTag)
  665. ;
  666.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  667.         Macro
  668.         _CMSetProfileElementReference
  669.             move.l              #$000C0035,D0
  670.             dc.w                $ABEE
  671.         EndM
  672.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  673.         IMPORT_CFM_FUNCTION CMSetProfileElementReference
  674.     ENDIF
  675.  
  676. ;
  677. ; pascal CMError CMGetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long *byteCount, void *elementData)
  678. ;
  679.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  680.         Macro
  681.         _CMGetPartialProfileElement
  682.             move.l              #$00140036,D0
  683.             dc.w                $ABEE
  684.         EndM
  685.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  686.         IMPORT_CFM_FUNCTION CMGetPartialProfileElement
  687.     ENDIF
  688.  
  689. ;
  690. ; pascal CMError CMSetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long byteCount, void *elementData)
  691. ;
  692.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  693.         Macro
  694.         _CMSetPartialProfileElement
  695.             move.l              #$00140037,D0
  696.             dc.w                $ABEE
  697.         EndM
  698.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  699.         IMPORT_CFM_FUNCTION CMSetPartialProfileElement
  700.     ENDIF
  701.  
  702. ;
  703. ; pascal CMError CMGetIndProfileElementInfo(CMProfileRef prof, unsigned long index, OSType *tag, unsigned long *elementSize, Boolean *refs)
  704. ;
  705.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  706.         Macro
  707.         _CMGetIndProfileElementInfo
  708.             move.l              #$00140021,D0
  709.             dc.w                $ABEE
  710.         EndM
  711.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  712.         IMPORT_CFM_FUNCTION CMGetIndProfileElementInfo
  713.     ENDIF
  714.  
  715. ;
  716. ; pascal CMError CMGetIndProfileElement(CMProfileRef prof, unsigned long index, unsigned long *elementSize, void *elementData)
  717. ;
  718.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  719.         Macro
  720.         _CMGetIndProfileElement
  721.             move.l              #$00100022,D0
  722.             dc.w                $ABEE
  723.         EndM
  724.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  725.         IMPORT_CFM_FUNCTION CMGetIndProfileElement
  726.     ENDIF
  727.  
  728. ;
  729. ; pascal CMError CMRemoveProfileElement(CMProfileRef prof, OSType tag)
  730. ;
  731.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  732.         Macro
  733.         _CMRemoveProfileElement
  734.             move.l              #$00080024,D0
  735.             dc.w                $ABEE
  736.         EndM
  737.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  738.         IMPORT_CFM_FUNCTION CMRemoveProfileElement
  739.     ENDIF
  740.  
  741. ;
  742. ; pascal CMError CMGetScriptProfileDescription(CMProfileRef prof, Str255 name, ScriptCode *code)
  743. ;
  744.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  745.         Macro
  746.         _CMGetScriptProfileDescription
  747.             move.l              #$000C003E,D0
  748.             dc.w                $ABEE
  749.         EndM
  750.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  751.         IMPORT_CFM_FUNCTION CMGetScriptProfileDescription
  752.     ENDIF
  753.  
  754. ;
  755. ; pascal CMError CMCloneProfileRef(CMProfileRef prof)
  756. ;
  757.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  758.         Macro
  759.         _CMCloneProfileRef
  760.             move.l              #$00040042,D0
  761.             dc.w                $ABEE
  762.         EndM
  763.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  764.         IMPORT_CFM_FUNCTION CMCloneProfileRef
  765.     ENDIF
  766.  
  767. ;
  768. ; pascal CMError CMGetProfileRefCount(CMProfileRef prof, long *count)
  769. ;
  770.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  771.         Macro
  772.         _CMGetProfileRefCount
  773.             move.l              #$00080043,D0
  774.             dc.w                $ABEE
  775.         EndM
  776.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  777.         IMPORT_CFM_FUNCTION CMGetProfileRefCount
  778.     ENDIF
  779.  
  780. ;
  781. ; pascal CMError CMProfileModified(CMProfileRef prof, Boolean *modified)
  782. ;
  783.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  784.         Macro
  785.         _CMProfileModified
  786.             move.l              #$00080044,D0
  787.             dc.w                $ABEE
  788.         EndM
  789.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  790.         IMPORT_CFM_FUNCTION CMProfileModified
  791.     ENDIF
  792.  
  793.  
  794. ;  named Color access functions 
  795. ;
  796. ; pascal CMError CMGetNamedColorInfo(CMProfileRef prof, unsigned long *deviceChannels, OSType *deviceColorSpace, OSType *PCSColorSpace, unsigned long *count, StringPtr prefix, StringPtr suffix)
  797. ;
  798.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  799.         Macro
  800.         _CMGetNamedColorInfo
  801.             move.l              #$001C0046,D0
  802.             dc.w                $ABEE
  803.         EndM
  804.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  805.         IMPORT_CFM_FUNCTION CMGetNamedColorInfo
  806.     ENDIF
  807.  
  808. ;
  809. ; pascal CMError CMGetNamedColorValue(CMProfileRef prof, StringPtr name, CMColor *deviceColor, CMColor *PCSColor)
  810. ;
  811.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  812.         Macro
  813.         _CMGetNamedColorValue
  814.             move.l              #$00100047,D0
  815.             dc.w                $ABEE
  816.         EndM
  817.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  818.         IMPORT_CFM_FUNCTION CMGetNamedColorValue
  819.     ENDIF
  820.  
  821. ;
  822. ; pascal CMError CMGetIndNamedColorValue(CMProfileRef prof, unsigned long index, CMColor *deviceColor, CMColor *PCSColor)
  823. ;
  824.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  825.         Macro
  826.         _CMGetIndNamedColorValue
  827.             move.l              #$00100048,D0
  828.             dc.w                $ABEE
  829.         EndM
  830.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  831.         IMPORT_CFM_FUNCTION CMGetIndNamedColorValue
  832.     ENDIF
  833.  
  834. ;
  835. ; pascal CMError CMGetNamedColorIndex(CMProfileRef prof, StringPtr name, unsigned long *index)
  836. ;
  837.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  838.         Macro
  839.         _CMGetNamedColorIndex
  840.             move.l              #$000C0049,D0
  841.             dc.w                $ABEE
  842.         EndM
  843.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  844.         IMPORT_CFM_FUNCTION CMGetNamedColorIndex
  845.     ENDIF
  846.  
  847. ;
  848. ; pascal CMError CMGetNamedColorName(CMProfileRef prof, unsigned long index, StringPtr name)
  849. ;
  850.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  851.         Macro
  852.         _CMGetNamedColorName
  853.             move.l              #$000C004A,D0
  854.             dc.w                $ABEE
  855.         EndM
  856.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  857.         IMPORT_CFM_FUNCTION CMGetNamedColorName
  858.     ENDIF
  859.  
  860.  
  861. ;  Low-level matching functions 
  862. ;
  863. ; pascal CMError NCWNewColorWorld(CMWorldRef *cw, CMProfileRef src, CMProfileRef dst)
  864. ;
  865.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  866.         Macro
  867.         _NCWNewColorWorld
  868.             move.l              #$000C0014,D0
  869.             dc.w                $ABEE
  870.         EndM
  871.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  872.         IMPORT_CFM_FUNCTION NCWNewColorWorld
  873.     ENDIF
  874.  
  875. ;
  876. ; pascal CMError CWConcatColorWorld(CMWorldRef *cw, CMConcatProfileSet *profileSet)
  877. ;
  878.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  879.         Macro
  880.         _CWConcatColorWorld
  881.             move.l              #$00080015,D0
  882.             dc.w                $ABEE
  883.         EndM
  884.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  885.         IMPORT_CFM_FUNCTION CWConcatColorWorld
  886.     ENDIF
  887.  
  888. ;
  889. ; pascal CMError CWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  890. ;
  891.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  892.         Macro
  893.         _CWNewLinkProfile
  894.             move.l              #$000C0033,D0
  895.             dc.w                $ABEE
  896.         EndM
  897.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  898.         IMPORT_CFM_FUNCTION CWNewLinkProfile
  899.     ENDIF
  900.  
  901. ;
  902. ; pascal void CWDisposeColorWorld(CMWorldRef cw)
  903. ;
  904.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  905.         Macro
  906.         _CWDisposeColorWorld
  907.             move.l              #$00040001,D0
  908.             dc.w                $ABEE
  909.         EndM
  910.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  911.         IMPORT_CFM_FUNCTION CWDisposeColorWorld
  912.     ENDIF
  913.  
  914. ;
  915. ; pascal CMError CWMatchColors(CMWorldRef cw, CMColor *myColors, unsigned long count)
  916. ;
  917.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  918.         Macro
  919.         _CWMatchColors
  920.             move.l              #$000C0002,D0
  921.             dc.w                $ABEE
  922.         EndM
  923.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  924.         IMPORT_CFM_FUNCTION CWMatchColors
  925.     ENDIF
  926.  
  927. ;
  928. ; pascal CMError CWCheckColors(CMWorldRef cw, CMColor *myColors, unsigned long count, long *result)
  929. ;
  930.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  931.         Macro
  932.         _CWCheckColors
  933.             move.l              #$00100003,D0
  934.             dc.w                $ABEE
  935.         EndM
  936.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  937.         IMPORT_CFM_FUNCTION CWCheckColors
  938.     ENDIF
  939.  
  940.  
  941. ;  Bitmap matching 
  942. ;
  943. ; pascal CMError CWMatchBitmap(CMWorldRef cw, CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  944. ;
  945.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  946.         Macro
  947.         _CWMatchBitmap
  948.             move.l              #$0010002C,D0
  949.             dc.w                $ABEE
  950.         EndM
  951.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  952.         IMPORT_CFM_FUNCTION CWMatchBitmap
  953.     ENDIF
  954.  
  955. ;
  956. ; pascal CMError CWCheckBitmap(CMWorldRef cw, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  957. ;
  958.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  959.         Macro
  960.         _CWCheckBitmap
  961.             move.l              #$0014002D,D0
  962.             dc.w                $ABEE
  963.         EndM
  964.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  965.         IMPORT_CFM_FUNCTION CWCheckBitmap
  966.     ENDIF
  967.  
  968.  
  969. ;  Quickdraw-specific matching 
  970. ;
  971. ; pascal CMError CWMatchPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  972. ;
  973.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  974.         Macro
  975.         _CWMatchPixMap
  976.             move.l              #$00100004,D0
  977.             dc.w                $ABEE
  978.         EndM
  979.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  980.         IMPORT_CFM_FUNCTION CWMatchPixMap
  981.     ENDIF
  982.  
  983. ;
  984. ; pascal CMError CWCheckPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon, BitMap *resultBitMap)
  985. ;
  986.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  987.         Macro
  988.         _CWCheckPixMap
  989.             move.l              #$00140007,D0
  990.             dc.w                $ABEE
  991.         EndM
  992.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  993.         IMPORT_CFM_FUNCTION CWCheckPixMap
  994.     ENDIF
  995.  
  996. ;
  997. ; pascal CMError NCMBeginMatching(CMProfileRef src, CMProfileRef dst, CMMatchRef *myRef)
  998. ;
  999.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1000.         Macro
  1001.         _NCMBeginMatching
  1002.             move.l              #$000C0016,D0
  1003.             dc.w                $ABEE
  1004.         EndM
  1005.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1006.         IMPORT_CFM_FUNCTION NCMBeginMatching
  1007.     ENDIF
  1008.  
  1009. ;
  1010. ; pascal void CMEndMatching(CMMatchRef myRef)
  1011. ;
  1012.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1013.         Macro
  1014.         _CMEndMatching
  1015.             move.l              #$0004000B,D0
  1016.             dc.w                $ABEE
  1017.         EndM
  1018.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1019.         IMPORT_CFM_FUNCTION CMEndMatching
  1020.     ENDIF
  1021.  
  1022. ;
  1023. ; pascal void NCMDrawMatchedPicture(PicHandle myPicture, CMProfileRef dst, Rect *myRect)
  1024. ;
  1025.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1026.         Macro
  1027.         _NCMDrawMatchedPicture
  1028.             move.l              #$000C0017,D0
  1029.             dc.w                $ABEE
  1030.         EndM
  1031.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1032.         IMPORT_CFM_FUNCTION NCMDrawMatchedPicture
  1033.     ENDIF
  1034.  
  1035. ;
  1036. ; pascal void CMEnableMatchingComment(Boolean enableIt)
  1037. ;
  1038.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1039.         Macro
  1040.         _CMEnableMatchingComment
  1041.             move.l              #$0002000D,D0
  1042.             dc.w                $ABEE
  1043.         EndM
  1044.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1045.         IMPORT_CFM_FUNCTION CMEnableMatchingComment
  1046.     ENDIF
  1047.  
  1048. ;
  1049. ; pascal CMError NCMUseProfileComment(CMProfileRef prof, unsigned long flags)
  1050. ;
  1051.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1052.         Macro
  1053.         _NCMUseProfileComment
  1054.             move.l              #$0008003B,D0
  1055.             dc.w                $ABEE
  1056.         EndM
  1057.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1058.         IMPORT_CFM_FUNCTION NCMUseProfileComment
  1059.     ENDIF
  1060.  
  1061. ;
  1062. ; pascal CMError CMCreateProfileIdentifier(CMProfileRef prof, CMProfileIdentifierPtr ident, unsigned long *size)
  1063. ;
  1064.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1065.         Macro
  1066.         _CMCreateProfileIdentifier
  1067.             move.l              #$000C0041,D0
  1068.             dc.w                $ABEE
  1069.         EndM
  1070.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1071.         IMPORT_CFM_FUNCTION CMCreateProfileIdentifier
  1072.     ENDIF
  1073.  
  1074.  
  1075. ;  System Profile access 
  1076. ;
  1077. ; pascal CMError CMGetSystemProfile(CMProfileRef *prof)
  1078. ;
  1079.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1080.         Macro
  1081.         _CMGetSystemProfile
  1082.             move.l              #$00040018,D0
  1083.             dc.w                $ABEE
  1084.         EndM
  1085.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1086.         IMPORT_CFM_FUNCTION CMGetSystemProfile
  1087.     ENDIF
  1088.  
  1089. ;
  1090. ; pascal CMError CMSetSystemProfile(const FSSpec *profileFileSpec)
  1091. ;
  1092.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1093.         Macro
  1094.         _CMSetSystemProfile
  1095.             move.l              #$00040019,D0
  1096.             dc.w                $ABEE
  1097.         EndM
  1098.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1099.         IMPORT_CFM_FUNCTION CMSetSystemProfile
  1100.     ENDIF
  1101.  
  1102.  
  1103. ;  External Profile Management 
  1104. ;
  1105. ; pascal CMError CMNewProfileSearch(CMSearchRecord *searchSpec, void *refCon, unsigned long *count, CMProfileSearchRef *searchResult)
  1106. ;
  1107.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1108.         Macro
  1109.         _CMNewProfileSearch
  1110.             move.l              #$00100027,D0
  1111.             dc.w                $ABEE
  1112.         EndM
  1113.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1114.         IMPORT_CFM_FUNCTION CMNewProfileSearch
  1115.     ENDIF
  1116.  
  1117. ;
  1118. ; pascal CMError CMUpdateProfileSearch(CMProfileSearchRef search, void *refCon, unsigned long *count)
  1119. ;
  1120.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1121.         Macro
  1122.         _CMUpdateProfileSearch
  1123.             move.l              #$000C0028,D0
  1124.             dc.w                $ABEE
  1125.         EndM
  1126.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1127.         IMPORT_CFM_FUNCTION CMUpdateProfileSearch
  1128.     ENDIF
  1129.  
  1130. ;
  1131. ; pascal void CMDisposeProfileSearch(CMProfileSearchRef search)
  1132. ;
  1133.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1134.         Macro
  1135.         _CMDisposeProfileSearch
  1136.             move.l              #$00040029,D0
  1137.             dc.w                $ABEE
  1138.         EndM
  1139.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1140.         IMPORT_CFM_FUNCTION CMDisposeProfileSearch
  1141.     ENDIF
  1142.  
  1143. ;
  1144. ; pascal CMError CMSearchGetIndProfile(CMProfileSearchRef search, unsigned long index, CMProfileRef *prof)
  1145. ;
  1146.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1147.         Macro
  1148.         _CMSearchGetIndProfile
  1149.             move.l              #$000C002A,D0
  1150.             dc.w                $ABEE
  1151.         EndM
  1152.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1153.         IMPORT_CFM_FUNCTION CMSearchGetIndProfile
  1154.     ENDIF
  1155.  
  1156. ;
  1157. ; pascal CMError CMSearchGetIndProfileFileSpec(CMProfileSearchRef search, unsigned long index, FSSpec *profileFile)
  1158. ;
  1159.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1160.         Macro
  1161.         _CMSearchGetIndProfileFileSpec
  1162.             move.l              #$000C002B,D0
  1163.             dc.w                $ABEE
  1164.         EndM
  1165.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1166.         IMPORT_CFM_FUNCTION CMSearchGetIndProfileFileSpec
  1167.     ENDIF
  1168.  
  1169. ;
  1170. ; pascal CMError CMProfileIdentifierFolderSearch(CMProfileIdentifierPtr ident, unsigned long *matchedCount, CMProfileSearchRef *searchResult)
  1171. ;
  1172.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1173.         Macro
  1174.         _CMProfileIdentifierFolderSearch
  1175.             move.l              #$000C003F,D0
  1176.             dc.w                $ABEE
  1177.         EndM
  1178.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1179.         IMPORT_CFM_FUNCTION CMProfileIdentifierFolderSearch
  1180.     ENDIF
  1181.  
  1182. ;
  1183. ; pascal CMError CMProfileIdentifierListSearch(CMProfileIdentifierPtr ident, CMProfileRef *profileList, unsigned long listSize, unsigned long *matchedCount, CMProfileRef *matchedList)
  1184. ;
  1185.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1186.         Macro
  1187.         _CMProfileIdentifierListSearch
  1188.             move.l              #$00140040,D0
  1189.             dc.w                $ABEE
  1190.         EndM
  1191.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1192.         IMPORT_CFM_FUNCTION CMProfileIdentifierListSearch
  1193.     ENDIF
  1194.  
  1195.  
  1196. ;  Utilities 
  1197. ;
  1198. ; pascal CMError CMGetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1199. ;
  1200.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1201.         Macro
  1202.         _CMGetColorSyncFolderSpec
  1203.             move.l              #$000C0011,D0
  1204.             dc.w                $ABEE
  1205.         EndM
  1206.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1207.         IMPORT_CFM_FUNCTION CMGetColorSyncFolderSpec
  1208.     ENDIF
  1209.  
  1210. ;
  1211. ; pascal CMError CMGetCWInfo(CMWorldRef cw, CMCWInfoRecord *info)
  1212. ;
  1213.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1214.         Macro
  1215.         _CMGetCWInfo
  1216.             move.l              #$0008001A,D0
  1217.             dc.w                $ABEE
  1218.         EndM
  1219.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1220.         IMPORT_CFM_FUNCTION CMGetCWInfo
  1221.     ENDIF
  1222.  
  1223. ;
  1224. ; pascal CMError CMConvertProfile2to1(CMProfileRef profv2, CMProfileHandle *profv1)
  1225. ;
  1226.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1227.         Macro
  1228.         _CMConvertProfile2to1
  1229.             move.l              #$00080045,D0
  1230.             dc.w                $ABEE
  1231.         EndM
  1232.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1233.         IMPORT_CFM_FUNCTION CMConvertProfile2to1
  1234.     ENDIF
  1235.  
  1236. ;  ColorSpace conversion functions 
  1237. ;
  1238. ; pascal CMError CMConvertXYZToLab(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1239. ;
  1240.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1241.         Macro
  1242.         _CMConvertXYZToLab
  1243.             move.l              #$0010004B,D0
  1244.             dc.w                $ABEE
  1245.         EndM
  1246.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1247.         IMPORT_CFM_FUNCTION CMConvertXYZToLab
  1248.     ENDIF
  1249.  
  1250. ;
  1251. ; pascal CMError CMConvertLabToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1252. ;
  1253.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1254.         Macro
  1255.         _CMConvertLabToXYZ
  1256.             move.l              #$0010004C,D0
  1257.             dc.w                $ABEE
  1258.         EndM
  1259.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1260.         IMPORT_CFM_FUNCTION CMConvertLabToXYZ
  1261.     ENDIF
  1262.  
  1263. ;
  1264. ; pascal CMError CMConvertXYZToLuv(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1265. ;
  1266.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1267.         Macro
  1268.         _CMConvertXYZToLuv
  1269.             move.l              #$0010004D,D0
  1270.             dc.w                $ABEE
  1271.         EndM
  1272.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1273.         IMPORT_CFM_FUNCTION CMConvertXYZToLuv
  1274.     ENDIF
  1275.  
  1276. ;
  1277. ; pascal CMError CMConvertLuvToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1278. ;
  1279.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1280.         Macro
  1281.         _CMConvertLuvToXYZ
  1282.             move.l              #$0010004E,D0
  1283.             dc.w                $ABEE
  1284.         EndM
  1285.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1286.         IMPORT_CFM_FUNCTION CMConvertLuvToXYZ
  1287.     ENDIF
  1288.  
  1289. ;
  1290. ; pascal CMError CMConvertXYZToYxy(const CMColor *src, CMColor *dst, unsigned long count)
  1291. ;
  1292.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1293.         Macro
  1294.         _CMConvertXYZToYxy
  1295.             move.l              #$000C004F,D0
  1296.             dc.w                $ABEE
  1297.         EndM
  1298.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1299.         IMPORT_CFM_FUNCTION CMConvertXYZToYxy
  1300.     ENDIF
  1301.  
  1302. ;
  1303. ; pascal CMError CMConvertYxyToXYZ(const CMColor *src, CMColor *dst, unsigned long count)
  1304. ;
  1305.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1306.         Macro
  1307.         _CMConvertYxyToXYZ
  1308.             move.l              #$000C0050,D0
  1309.             dc.w                $ABEE
  1310.         EndM
  1311.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1312.         IMPORT_CFM_FUNCTION CMConvertYxyToXYZ
  1313.     ENDIF
  1314.  
  1315. ;
  1316. ; pascal CMError CMConvertRGBToHLS(const CMColor *src, CMColor *dst, unsigned long count)
  1317. ;
  1318.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1319.         Macro
  1320.         _CMConvertRGBToHLS
  1321.             move.l              #$000C0051,D0
  1322.             dc.w                $ABEE
  1323.         EndM
  1324.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1325.         IMPORT_CFM_FUNCTION CMConvertRGBToHLS
  1326.     ENDIF
  1327.  
  1328. ;
  1329. ; pascal CMError CMConvertHLSToRGB(const CMColor *src, CMColor *dst, unsigned long count)
  1330. ;
  1331.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1332.         Macro
  1333.         _CMConvertHLSToRGB
  1334.             move.l              #$000C0052,D0
  1335.             dc.w                $ABEE
  1336.         EndM
  1337.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1338.         IMPORT_CFM_FUNCTION CMConvertHLSToRGB
  1339.     ENDIF
  1340.  
  1341. ;
  1342. ; pascal CMError CMConvertRGBToHSV(const CMColor *src, CMColor *dst, unsigned long count)
  1343. ;
  1344.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1345.         Macro
  1346.         _CMConvertRGBToHSV
  1347.             move.l              #$000C0053,D0
  1348.             dc.w                $ABEE
  1349.         EndM
  1350.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1351.         IMPORT_CFM_FUNCTION CMConvertRGBToHSV
  1352.     ENDIF
  1353.  
  1354. ;
  1355. ; pascal CMError CMConvertHSVToRGB(const CMColor *src, CMColor *dst, unsigned long count)
  1356. ;
  1357.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1358.         Macro
  1359.         _CMConvertHSVToRGB
  1360.             move.l              #$000C0054,D0
  1361.             dc.w                $ABEE
  1362.         EndM
  1363.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1364.         IMPORT_CFM_FUNCTION CMConvertHSVToRGB
  1365.     ENDIF
  1366.  
  1367. ;
  1368. ; pascal CMError CMConvertRGBToGray(const CMColor *src, CMColor *dst, unsigned long count)
  1369. ;
  1370.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1371.         Macro
  1372.         _CMConvertRGBToGray
  1373.             move.l              #$000C0055,D0
  1374.             dc.w                $ABEE
  1375.         EndM
  1376.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1377.         IMPORT_CFM_FUNCTION CMConvertRGBToGray
  1378.     ENDIF
  1379.  
  1380. ;
  1381. ; pascal CMError CMConvertXYZToFixedXYZ(const CMXYZColor *src, CMFixedXYZColor *dst, unsigned long count)
  1382. ;
  1383.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1384.         Macro
  1385.         _CMConvertXYZToFixedXYZ
  1386.             move.l              #$000C0056,D0
  1387.             dc.w                $ABEE
  1388.         EndM
  1389.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1390.         IMPORT_CFM_FUNCTION CMConvertXYZToFixedXYZ
  1391.     ENDIF
  1392.  
  1393. ;
  1394. ; pascal CMError CMConvertFixedXYZToXYZ(const CMFixedXYZColor *src, CMXYZColor *dst, unsigned long count)
  1395. ;
  1396.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1397.         Macro
  1398.         _CMConvertFixedXYZToXYZ
  1399.             move.l              #$000C0057,D0
  1400.             dc.w                $ABEE
  1401.         EndM
  1402.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1403.         IMPORT_CFM_FUNCTION CMConvertFixedXYZToXYZ
  1404.     ENDIF
  1405.  
  1406. ;  PS-related 
  1407. ;
  1408. ; pascal CMError CMGetPS2ColorSpace(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1409. ;
  1410.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1411.         Macro
  1412.         _CMGetPS2ColorSpace
  1413.             move.l              #$0014002E,D0
  1414.             dc.w                $ABEE
  1415.         EndM
  1416.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1417.         IMPORT_CFM_FUNCTION CMGetPS2ColorSpace
  1418.     ENDIF
  1419.  
  1420. ;
  1421. ; pascal CMError CMGetPS2ColorRenderingIntent(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1422. ;
  1423.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1424.         Macro
  1425.         _CMGetPS2ColorRenderingIntent
  1426.             move.l              #$0014002F,D0
  1427.             dc.w                $ABEE
  1428.         EndM
  1429.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1430.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingIntent
  1431.     ENDIF
  1432.  
  1433. ;
  1434. ; pascal CMError CMGetPS2ColorRendering(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1435. ;
  1436.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1437.         Macro
  1438.         _CMGetPS2ColorRendering
  1439.             move.l              #$00180030,D0
  1440.             dc.w                $ABEE
  1441.         EndM
  1442.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1443.         IMPORT_CFM_FUNCTION CMGetPS2ColorRendering
  1444.     ENDIF
  1445.  
  1446. ;
  1447. ; pascal CMError CMGetPS2ColorRenderingVMSize(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize, Boolean *preferredCMMnotfound)
  1448. ;
  1449.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1450.         Macro
  1451.         _CMGetPS2ColorRenderingVMSize
  1452.             move.l              #$0010003D,D0
  1453.             dc.w                $ABEE
  1454.         EndM
  1455.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1456.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingVMSize
  1457.     ENDIF
  1458.  
  1459.  
  1460. ;  ColorSync 1.0 functions which have parallel 2.0 counterparts 
  1461. ;
  1462. ; pascal CMError CWNewColorWorld(CMWorldRef *cw, CMProfileHandle src, CMProfileHandle dst)
  1463. ;
  1464.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1465.         Macro
  1466.         _CWNewColorWorld
  1467.             move.l              #$000C0000,D0
  1468.             dc.w                $ABEE
  1469.         EndM
  1470.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1471.         IMPORT_CFM_FUNCTION CWNewColorWorld
  1472.     ENDIF
  1473.  
  1474. ;
  1475. ; pascal CMError ConcatenateProfiles(CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  1476. ;
  1477.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1478.         Macro
  1479.         _ConcatenateProfiles
  1480.             move.l              #$000C000C,D0
  1481.             dc.w                $ABEE
  1482.         EndM
  1483.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1484.         IMPORT_CFM_FUNCTION ConcatenateProfiles
  1485.     ENDIF
  1486.  
  1487. ;
  1488. ; pascal CMError CMBeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1489. ;
  1490.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1491.         Macro
  1492.         _CMBeginMatching
  1493.             move.l              #$000C000A,D0
  1494.             dc.w                $ABEE
  1495.         EndM
  1496.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1497.         IMPORT_CFM_FUNCTION CMBeginMatching
  1498.     ENDIF
  1499.  
  1500. ;
  1501. ; pascal void CMDrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1502. ;
  1503.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1504.         Macro
  1505.         _CMDrawMatchedPicture
  1506.             move.l              #$000C0009,D0
  1507.             dc.w                $ABEE
  1508.         EndM
  1509.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1510.         IMPORT_CFM_FUNCTION CMDrawMatchedPicture
  1511.     ENDIF
  1512.  
  1513. ;
  1514. ; pascal CMError CMUseProfileComment(CMProfileHandle profile)
  1515. ;
  1516.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1517.         Macro
  1518.         _CMUseProfileComment
  1519.             move.l              #$00040008,D0
  1520.             dc.w                $ABEE
  1521.         EndM
  1522.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1523.         IMPORT_CFM_FUNCTION CMUseProfileComment
  1524.     ENDIF
  1525.  
  1526. ;
  1527. ; pascal void CMGetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1528. ;
  1529.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1530.         Macro
  1531.         _CMGetProfileName
  1532.             move.l              #$0008000E,D0
  1533.             dc.w                $ABEE
  1534.         EndM
  1535.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1536.         IMPORT_CFM_FUNCTION CMGetProfileName
  1537.     ENDIF
  1538.  
  1539. ;
  1540. ; pascal long CMGetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1541. ;
  1542.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1543.         Macro
  1544.         _CMGetProfileAdditionalDataOffset
  1545.             move.l              #$0004000F,D0
  1546.             dc.w                $ABEE
  1547.         EndM
  1548.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1549.         IMPORT_CFM_FUNCTION CMGetProfileAdditionalDataOffset
  1550.     ENDIF
  1551.  
  1552.  
  1553. ;  ProfileResponder functions 
  1554. ;
  1555. ; pascal CMError GetProfile(OSType deviceType, long refNum, CMProfileHandle aProfile, CMProfileHandle *returnedProfile)
  1556. ;
  1557.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1558.         Macro
  1559.         _GetProfile
  1560.             move.l              #$00100005,D0
  1561.             dc.w                $ABEE
  1562.         EndM
  1563.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1564.         IMPORT_CFM_FUNCTION GetProfile
  1565.     ENDIF
  1566.  
  1567. ;
  1568. ; pascal CMError SetProfile(OSType deviceType, long refNum, CMProfileHandle newProfile)
  1569. ;
  1570.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1571.         Macro
  1572.         _SetProfile
  1573.             move.l              #$000C0006,D0
  1574.             dc.w                $ABEE
  1575.         EndM
  1576.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1577.         IMPORT_CFM_FUNCTION SetProfile
  1578.     ENDIF
  1579.  
  1580. ;
  1581. ; pascal CMError SetProfileDescription(OSType deviceType, long refNum, long deviceData, CMProfileHandle hProfile)
  1582. ;
  1583.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1584.         Macro
  1585.         _SetProfileDescription
  1586.             move.l              #$00100010,D0
  1587.             dc.w                $ABEE
  1588.         EndM
  1589.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1590.         IMPORT_CFM_FUNCTION SetProfileDescription
  1591.     ENDIF
  1592.  
  1593. ;
  1594. ; pascal CMError GetIndexedProfile(OSType deviceType, long refNum, CMProfileSearchRecordHandle search, CMProfileHandle *returnProfile, long *index)
  1595. ;
  1596.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1597.         Macro
  1598.         _GetIndexedProfile
  1599.             move.l              #$00140012,D0
  1600.             dc.w                $ABEE
  1601.         EndM
  1602.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1603.         IMPORT_CFM_FUNCTION GetIndexedProfile
  1604.     ENDIF
  1605.  
  1606. ;
  1607. ; pascal CMError DeleteDeviceProfile(OSType deviceType, long refNum, CMProfileHandle deleteMe)
  1608. ;
  1609.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1610.         Macro
  1611.         _DeleteDeviceProfile
  1612.             move.l              #$000C0013,D0
  1613.             dc.w                $ABEE
  1614.         EndM
  1615.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1616.         IMPORT_CFM_FUNCTION DeleteDeviceProfile
  1617.     ENDIF
  1618.  
  1619.  
  1620.     IF OLDROUTINENAMES THEN
  1621. ;  constants 
  1622.  
  1623. kMatchCMMType                    EQU        $00000001
  1624. kMatchApplProfileVersion        EQU        $00000002
  1625. kMatchDataType                    EQU        $00000004
  1626. kMatchDeviceType                EQU        $00000008
  1627. kMatchDeviceManufacturer        EQU        $00000010
  1628. kMatchDeviceModel                EQU        $00000020
  1629. kMatchDeviceAttributes            EQU        $00000040
  1630. kMatchFlags                        EQU        $00000080
  1631. kMatchOptions                    EQU        $00000100
  1632. kMatchWhite                        EQU        $00000200
  1633. kMatchBlack                        EQU        $00000400
  1634. ;  types 
  1635. CMYKColor                RECORD 0
  1636. f                         ds        CMCMYKColor
  1637. sizeof                     EQU *                    ; size:   $8 (8)
  1638.                         ENDR
  1639.  
  1640.  
  1641. ; typedef CMWorldRef                     CWorld
  1642.  
  1643. ; typedef long *                        CMGamutResult
  1644.  
  1645. ;  functions 
  1646. ;
  1647. ; pascal void EndMatching(CMMatchRef myRef)
  1648. ;
  1649.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1650.         Macro
  1651.         _EndMatching
  1652.             move.l              #$0004000B,D0
  1653.             dc.w                $ABEE
  1654.         EndM
  1655.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1656.         IMPORT_CFM_FUNCTION EndMatching
  1657.     ENDIF
  1658.  
  1659. ;
  1660. ; pascal void EnableMatching(Boolean enableIt)
  1661. ;
  1662.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1663.         Macro
  1664.         _EnableMatching
  1665.             move.l              #$0002000D,D0
  1666.             dc.w                $ABEE
  1667.         EndM
  1668.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1669.         IMPORT_CFM_FUNCTION EnableMatching
  1670.     ENDIF
  1671.  
  1672. ;
  1673. ; pascal CMError GetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1674. ;
  1675.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1676.         Macro
  1677.         _GetColorSyncFolderSpec
  1678.             move.l              #$000C0011,D0
  1679.             dc.w                $ABEE
  1680.         EndM
  1681.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1682.         IMPORT_CFM_FUNCTION GetColorSyncFolderSpec
  1683.     ENDIF
  1684.  
  1685. ;
  1686. ; pascal CMError BeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1687. ;
  1688.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1689.         Macro
  1690.         _BeginMatching
  1691.             move.l              #$000C000A,D0
  1692.             dc.w                $ABEE
  1693.         EndM
  1694.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1695.         IMPORT_CFM_FUNCTION BeginMatching
  1696.     ENDIF
  1697.  
  1698. ;
  1699. ; pascal void DrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1700. ;
  1701.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1702.         Macro
  1703.         _DrawMatchedPicture
  1704.             move.l              #$000C0009,D0
  1705.             dc.w                $ABEE
  1706.         EndM
  1707.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1708.         IMPORT_CFM_FUNCTION DrawMatchedPicture
  1709.     ENDIF
  1710.  
  1711. ;
  1712. ; pascal CMError UseProfile(CMProfileHandle profile)
  1713. ;
  1714.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1715.         Macro
  1716.         _UseProfile
  1717.             move.l              #$00040008,D0
  1718.             dc.w                $ABEE
  1719.         EndM
  1720.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1721.         IMPORT_CFM_FUNCTION UseProfile
  1722.     ENDIF
  1723.  
  1724. ;
  1725. ; pascal void GetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1726. ;
  1727.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1728.         Macro
  1729.         _GetProfileName
  1730.             move.l              #$0008000E,D0
  1731.             dc.w                $ABEE
  1732.         EndM
  1733.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1734.         IMPORT_CFM_FUNCTION GetProfileName
  1735.     ENDIF
  1736.  
  1737. ;
  1738. ; pascal long GetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1739. ;
  1740.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1741.         Macro
  1742.         _GetProfileAdditionalDataOffset
  1743.             move.l              #$0004000F,D0
  1744.             dc.w                $ABEE
  1745.         EndM
  1746.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1747.         IMPORT_CFM_FUNCTION GetProfileAdditionalDataOffset
  1748.     ENDIF
  1749.  
  1750.     ENDIF    ; OLDROUTINENAMES
  1751.  
  1752. ;  Deprecated stuff
  1753.  
  1754. ;  PrGeneral parameter blocks 
  1755. TEnableColorMatchingBlk    RECORD 0
  1756. iOpCode                     ds.w    1                ; offset: $0 (0)
  1757. iError                     ds.w    1                ; offset: $2 (2)
  1758. lReserved                 ds.l    1                ; offset: $4 (4)
  1759. hPrint                     ds.l    1                ; offset: $8 (8)
  1760. fEnableIt                 ds.b    1                ; offset: $C (12)
  1761. filler                     ds.b    1                ; offset: $D (13)
  1762. sizeof                     EQU *                    ; size:   $E (14)
  1763.                         ENDR
  1764. TRegisterProfileBlk        RECORD 0
  1765. iOpCode                     ds.w    1                ; offset: $0 (0)
  1766. iError                     ds.w    1                ; offset: $2 (2)
  1767. lReserved                 ds.l    1                ; offset: $4 (4)
  1768. hPrint                     ds.l    1                ; offset: $8 (8)
  1769. fRegisterIt                 ds.b    1                ; offset: $C (12)
  1770. filler                     ds.b    1                ; offset: $D (13)
  1771. sizeof                     EQU *                    ; size:   $E (14)
  1772.                         ENDR
  1773.     ENDIF ; __CMAPPLICATION__ 
  1774.  
  1775.